The overall goal of this proposed research is to develop, apply and disseminate advanced, yet practical quantitative methods to enable accurate inference from complex longitudinal data on individuals infected with HIV. Marginal structural models are an accurate and flexible potential outcomes-based approach for estimating etiologic effects using observational data. This innovative approach for longitudinal data analysis has a rapidly increasing appearance in the scholarly literature. The aims of this proposal are to: (1) extend marginal structural models to generalize estimates from a study sample to a target population; (2) extend marginal structural models to studies nested in cohorts; (3) extend marginal structural models to account for differential exposure measurement error; (4) extend marginal structural models to account for prior information using Bayesian methods; (5) develop estimates for a marginal structural model that combine estimation from inverse probability weighting and the parametric G-formula; and (6) develop widely- applicable statistical software to implement methods for extensions in aims 1-5. The innovations defined in aims 1-5 are essential for marginal structural models to become more useful to applied scientists studying HIV and public health. To accomplish these aims, we will use important and timely empirical data from the Centers for AIDS Research (CFAR) Network of Integrated Clinical Systems (CNICS). The CNICS includes over 20,000 HIV infected adults seen quarterly in clinical care at 8 CFAR sites since 2006. The fruits of this research will be described in a series of peer-reviewed papers for each aim. These papers will define each problem, describe an innovative solution, provide support for the solution in terms of Monte Carlo simulation experiments, illustrate the method using analysis of CNICS data, and provide guidance on implementation of the solution using developed statistical software. In conclusion, the present proposal describes a significant and innovative program of research that will result in groundbreaking methodological tools for making accurate inferences from complex observational studies of HIV and other diseases.